package com.fujimana.rockincat.restree.proxy;

import java.lang.annotation.Annotation;
import java.lang.reflect.Method;
import java.util.Map;

public class ResourceMetaData {
	
	private String key;
	
	private int precedence;
	
	private boolean endpoint;
	
	private String path;
	
	private Class<?> target;
	
	private Class<?>[] childResource;
	
	private Method handleMethod;
	
	private Map<String, Method> invokeMethods;
	
	private Map<String, BindMetaData> paramTypes;
	
	public Map<String, BindMetaData> getParamTypes() {
		return paramTypes;
	}

	public void setParamTypes(Map<String, BindMetaData> paramTypes) {
		this.paramTypes = paramTypes;
	}

	public Method getInvokeMethod(Class<? extends Annotation> method) {
		return invokeMethods.get(method.getName());
	}
	
	public BindMetaData getBindMetaData(Class<? extends Annotation> method) {
		return paramTypes.get(method.getName());
	}

	public Map<String, Method> getInvokeMethods() {
		return invokeMethods;
	}

	public void setInvokeMethods(Map<String, Method> invokeMethods) {
		this.invokeMethods = invokeMethods;
	}

	public Method getHandleMethod() {
		return handleMethod;
	}

	public void setHandleMethod(Method handleMethod) {
		this.handleMethod = handleMethod;
	}

	public Class<?>[] getChildResource() {
		return childResource;
	}

	public void setChildResource(Class<?>[] childResource) {
		this.childResource = childResource;
	}

	public Class<?> getTarget() {
		return target;
	}

	public void setTarget(Class<?> target) {
		this.target = target;
	}

	public String getPath() {
		return path;
	}

	public void setPath(String path) {
		this.path = path;
	}

	public boolean isEndpoint() {
		return endpoint;
	}

	public void setEndpoint(boolean endpoint) {
		this.endpoint = endpoint;
	}

	public String getKey() {
		return key;
	}

	public void setKey(String key) {
		this.key = key;
	}

	public int getPrecedence() {
		return precedence;
	}

	public void setPrecedence(int precedence) {
		this.precedence = precedence;
	}
	
	
}
